export default {
  data() {
    return {
      optionsAll: [],
      cityOptions: {},
      paramsAll: {
        cityValue: {
          name: 95560,
          values: [],
          op: 0,
        },
        postValue:  0,
      },
      optionsParams: {
        conditions: {
          conditionOp: 0,
          conditionItems: [],
        },
        pageSize: 100,
        pageNo: 1,
      },
      nextDate: "",
      nextDateArr:  [],
    };
  },

  methods: {
    filterOptions(data, id) {
      let options = {};
      options = data.length && data.find((item) => item.id == id);
      console.log(options);
      return options;
    },
    nextDates(date) {
      let today = new Date();

      // 增加一天
      let tomorrow = new Date(today);
      tomorrow.setDate(today.getDate() + 1);

      // 格式化日期
      let tomorrowString = tomorrow.toISOString().slice(0, 10);
      let startOfDay = `${tomorrowString} 00:00:00`;
      let endOfDay = `${tomorrowString} 23:59:59`;

      // 设置下次日期
      this.nextDate = tomorrow;
      // 创建日期数组
      this.nextDateArr = [startOfDay, endOfDay];
    },
  },
};
